/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$(document).ready(function() {
    $("#rechargebypoint").click(function() {
        var point = $('#rechargepoint').val();
        $.ajax({
            url: 'rechargebypoint',
            data: {point: point},
            type: 'POST',
            success: function(data) {
                $("#dialog").html(data);
                $("#dialog").dialog({
                    modal: true,
                    buttons: {
                        OK: function() {
                            $("#dialog").dialog('close');
                            location.reload();
                        }
                    }
                });
            },
            error: function() {

            }
        });
    })
})

